//
//  XNFixedAssetBillInfoRequest.m
//  XINNingOA
//
//  Created by samuel on 2021/7/16.
//

#import "XNFixedAssetBillInfoRequest.h"

@implementation XNFixedAssetBillInfoRequest
{
    NSString *_orderId;
}

- (instancetype)initWithOrderId:(NSString *)orderId
{
    self = [super init];
    if (self) {
        _orderId = orderId;
    }
    return self;
}

- (NSString *)requestUrl
{
    
    return @"/api/FixedAssets/LoadAppFormById";
}

- (YTKRequestMethod)requestMethod
{
    return YTKRequestMethodGET;
}

- (id)requestArgument
{
    return @{
        @"id":_orderId,
    };
}

- (XNFixedAssetBillInfoModel *)infoModel
{
    NSDictionary *response = [self responseJSONObject];
    if (self.success) {
        NSDictionary *dic = response[@"result"][@"data"];
        XNFixedAssetBillInfoModel *info = [XNFixedAssetBillInfoModel modelWithDictionary:dic];
        return info;
        
    }else{
        return nil;
    }
}

@end
